﻿using System;
using System.Data;
using System.Data.SqlServerCe;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace zbaza
{
    class Program
    {
        public static Database1DataSetTableAdapters.OsobaTableAdapter adapterosoby =
            new Database1DataSetTableAdapters.OsobaTableAdapter();
        public static Database1DataSet.OsobaDataTable dsetosoba =
            new Database1DataSet.OsobaDataTable();

        static void Main(string[] args)
        {
            adapterosoby.Fill(dsetosoba);

            //dsetosoba.AddOsobaRow("kskjf", "zuk", "mart");
            Database1DataSet.OsobaRow nowyrekord = dsetosoba.NewOsobaRow();
            nowyrekord.Pesel = Console.ReadLine().ToString();
            nowyrekord.Nazwisko = Console.ReadLine().ToString();
            nowyrekord.Imie = Console.ReadLine().ToString();
            dsetosoba.Rows.Add(nowyrekord);

            foreach (Database1DataSet.OsobaRow osrow in dsetosoba.Rows)
            {
                Console.WriteLine(osrow.Nazwisko + " " + osrow.Imie);
            }


            adapterosoby.Update(dsetosoba);
            Console.ReadKey();
        }
    }
}
